﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Administrator/Views/Shared/admin.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CollegeWebsite.Areas.Administrator.Models.Contact>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
<%--            <th>
                ContactID
            </th>--%>
            <th>
                ContactName
            </th>
            <th>
                ContactAddress
            </th>
            <th>
                ContactPhone
            </th>
            <th>
                ContactEmail
            </th>
            <th>
                ContactFax
            </th>
            <th>
                ContactStatus
            </th>
            <th>
                DepartmentID
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.ContactID }) %> |
                <%= Html.ActionLink("Details", "Details", new { id=item.ContactID })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id=item.ContactID })%>
            </td>
<%--            <td>
                <%= Html.Encode(item.ContactID) %>
            </td>--%>
            <td>
                <%= Html.Encode(item.ContactName) %>
            </td>
            <td>
                <%= Html.Encode(item.ContactAddress) %>
            </td>
            <td>
                <%= Html.Encode(item.ContactPhone) %>
            </td>
            <td>
                <%= Html.Encode(item.ContactEmail) %>
            </td>
            <td>
                <%= Html.Encode(item.ContactFax) %>
            </td>
            <td>
                <%= Html.Encode(item.ContactStatus) %>
            </td>
            <td>
                <%= Html.Encode(item.DepartmentID) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="TitleContentPlaceHolder" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="SlideBarRight" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="PageHeadingPlaceHolder" runat="server">
</asp:Content>

